pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let mut cache = [0, 1];
    let mut ans = 0;
    for i in 1.. {
        let i = i % 2;
        let num = cache[i];
        if num >= threshold {
            break;
        }
        if num % 2 == 1 {
            ans += num;
        }
        cache[1 - i] = cache[0] + cache[1];
    }
    ans
}
